package test;

import bean.Husband;
import bean.Wife;
import dao.impl.WideDaoImpl;

public class Demon3 {
    public static void main(String[] args) {
        WideDaoImpl wideDao = new WideDaoImpl();
        Wife wife = wideDao.findByWifeId(1);
        System.out.println(wife.getWifename()+"\t"+wife.getHusband().getHusname());

        Husband byHid = wideDao.findByHid(2);
        System.out.println(byHid.getHusname()+"\t"+byHid.getWife().getWifename());
    }
}
